#include<iostream>
using namespace std;
int main()
{
	int i,n,goal,a[1000];
	cin>>n;
	for(i=1;i<=n;i++)
		cin>>a[i];
	cin>>goal;
	if(goal<=1||goal>n)cout<<"error!";
	else
	{
		for(i=1;i<=n;i++)
		{
			if(i!=goal-1)
				cout<<a[i]<<' ';
		}
	}
	
	return 0;
}